<?php
/**
 * Created by PhpStorm.
 * User: jcc
 * Date: 16/7/8
 * Time: 上午10:16
 */
use app\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap\Carousel;
use yii\widgets\ActiveForm;
AppAsset::register($this);
AppAsset::addCss($this,Yii::$app->request->baseUrl."/slick/slick-theme.css");
AppAsset::addCss($this,Yii::$app->request->baseUrl."/slick/slick.css");
AppAsset::addCss($this, Yii::$app->request->baseUrl . "/css/home.css");
AppAsset::addScript($this, Yii::$app->request->baseUrl . "/slick/slick.min.js");
$base = Yii::$app->request->baseUrl;
?>
<div style="height: 150px;width: 100%" class="test">
    <?php for($i=0;$i<count($banners);$i++){ ?>
        <div><img style="width: 100%;height: 150px" class="testimg" src="<?= $banners[$i]['pic_url']?>" /></div>
    <?php } ?>
</div>
<script language="JavaScript">
    $(document).ready(function(){
        $('.test').slick({
            'autoplay':true
    });
    });

</script>

